/* css/login.css */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
}

* {
    box-sizing: border-box; /* 确保所有元素包含padding和border在宽度内 */
}

body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 1rem; /* 添加body内边距防止在小屏幕上贴边 */
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.login-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    text-align: center;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%; /* 确保表单宽度填充容器 */
}

#loginForm label {
    display: block;
    text-align: left;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

#loginForm input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.95rem;
    /* 移除可能导致溢出的属性 */
}

#loginForm input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#loginForm button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.3rem;
    transition: background 0.2s;
    width: 100%;
}

#loginForm button:hover {
    background-color: #2980b9;
}